Skip to main content

Query Language

The Users Service enables users to query other users using a language that is compatible with a large subset of the SCIM querying language. This language allows users to filter the list of users using a variety of operators.

Operators

OperatorDescriptionExample
eqEquals: =last_name eq "Troßbach"
neNot equal: !=last_name ne "Troßbach"
coContainslast_name co "oßb"
swStarts withlast_name sw "Tro"
ewEnds withlast_name sw "bach"
gtGreater thancreated_at gt "2023-09-19T14:39:24.444956Z"
ltLower thancreated_at lt "2023-09-20T14:39:24.444956Z"
geGreater or equalcreated_at ge "2023-09-19T14:39:24.444956Z"
lwLower or equalcreated_at lw "2023-09-20T14:39:24.444956Z"
prIs Presentidp_workforce_id pr

Currently the second operand can only be a literal and cannot be another field.

Logical Expressions

The querying language also supports a number of logical expression and the possiblity to chain multiple expressions.

ExpressionExample
ANDfirst_name eq "Markus" AND last_name eq "Troßbach"
ORlifecycle eq "ACTIVE" OR lifecycle eq "INACTIVE"
NOTNOT(first_name eq "Markus" AND last_name eq "Troßbach")

More Examples

  • Get all users with lifecycle value ERROR:

    • lifecycle eq "ERROR"
  • Get all users with lifecycle value ERROR which do not have a idp_workforce_id:

    • lifecycle eq "ERROR" AND NOT(idp_workforce_id pr)
  • Get users with lifecycle value PENDING or SUSPENDED

    • lifecycle eq "PENDING" OR lifecycle eq "SUSPENDED"
  • Get users with lifecycle value PENDING or ERROR and do not have a idp_workforce_id:

    • (lifecycle eq "PENDING" OR lifecycle eq "ERROR") AND NOT(idp_workforce_id pr)